<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div {
            position: relative;
            width: 100%;
        }
        
        img {
            vertical-align: top;
        }
        #img1{
            width: 300px;
            height: 400px;
        }
        #img2{
            width: 300px;
            height: 200px;
        }
        #img3{
            width: 300px;
            height: 200px;
        }
        #img4{
            width: 300px;
            height: 200px;
        }
        #img5{
            width: 200px;
            height: 355px;
        }
        #img6{
            position: absolute;
            left: 50%;
            margin-left:-150px;
            top:230px;
            width: 300px;
            height: 169px;
        }
    </style>
    <script src="jquery-1.12.2.js"></script>
    <script>
        $(function() {
            $("#btn1").click(function() {
                // 获取div里的img，最后一个隐藏
                $("div>img").last("img").hide(800, function() {
                    $(this).prev().hide(500, arguments.callee)
                });
            });
            $("#btn2").click(function() {
                $("div>img").first("img").show(800, function() {
                    $(this).next().show(500, arguments.callee)
                });
            });
        });
    </script>
</head>

<body>
    <input type="button" value="隐藏" id="btn1" />
    <input type="button" value="显示" id="btn2" />
    <div>
        <img src="aw.jpg" id="img1" />
        <img src="阿文1.jpg"  id="img2" />
        <img src="阿文。.jpg"  id="img3"/>
        <img src="阿文小朋友.jpg"  id="img4"/>
        <img src="QQ图片20180207162506.jpg" alt="" id="img5">
        <img src="QQ图片20180330201800.jpg" alt="" id="img6" >
    </div>
</body>

</html>